Skip to content

fix: translated button loading crash#5896

Merged
idoshamun merged 4 commits intomainfrom
codex/fix-translate-button-loading-crash
Apr 20, 2026
Merged

fix: translated button loading crash#5896
idoshamun merged 4 commits intomainfrom
codex/fix-translate-button-loading-crash

Conversation

@idoshamun
Copy link
Copy Markdown
Member

@idoshamun idoshamun commented Apr 20, 2026

Summary

  • keep Button children inside a stable .btn-label wrapper across loading state changes
  • hide the existing label while loading instead of replacing the text node with a new <span>
  • add a regression test that verifies the same label element stays mounted when loading toggles

Root Cause

Chrome's native translation feature mutates button text nodes outside React's control. Our shared Button component swapped a direct text child for a new wrapper element when loading became true, so React later tried to remove a child node that Chrome Translate had already rewritten. That produced the removeChild / NotFoundError crash.

Impact

This fixes the translated onboarding social signup crash and reduces the same DOM-mutation risk anywhere else the shared loading button is used.

Validation

  • validated the reproduction and root cause locally before the code change
  • added a targeted regression test for the stable label wrapper behavior
  • did not get a green Jest run in this environment because the repo's local Jest setup is currently failing with testEnvironmentOptions initialization

Preview domain

https://codex-fix-translate-button-loadi.preview.app.daily.dev

@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
daily-webapp Ready Ready Preview Apr 20, 2026 2:41pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
storybook Ignored Ignored Apr 20, 2026 2:41pm

Request Review

@idoshamun idoshamun changed the title [codex] fix translated button loading crash fix: translated button loading crash Apr 20, 2026
@idoshamun idoshamun marked this pull request as ready for review April 20, 2026 14:04
@idoshamun idoshamun merged commit 45a782b into main Apr 20, 2026
10 of 12 checks passed
@idoshamun idoshamun deleted the codex/fix-translate-button-loading-crash branch April 20, 2026 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant